package com.osgix.common.pojo;

import java.io.Serializable;

/**
 * 日志审计
 */
public class Audit implements Serializable {

	private static final long serialVersionUID = -327581716249031806L;

	/**
	 * 日志编号
	 */
	private String logId = "";

	/**
	 * 日志名称
	 */
	private String logName = "";

	/**
	 * 日志操作级别
	 */
	private String logLevel = "";
	private String logLevelName = "";

	private String parentId = "";
	private String parentName = "";

	/**
	 * 克隆
	 */
	public Object clone() {
		Audit audit = new Audit();
		audit.setLogId(logId);
		audit.setLogName(logName);
		audit.setLogLevel(logLevel);
		audit.setLogLevelName(logLevelName);
		return audit;
	}

	/**
	 * 构造函数
	 *
	 */
	public Audit() {

	}

	/**
	 * 构造函数
	 * @param logId 日志Id
	 */
	public Audit(String log_Id) {
		this.logId = log_Id;
	}

	public String getParentId() {
		return parentId;
	}

	public void setParentId(String parentId) {
		this.parentId = parentId;
	}

	public String getParentName() {
		return parentName;
	}

	public void setParentName(String parentName) {
		this.parentName = parentName;
	}

	/**
	 * 构造函数
	 * @param deptID
	 * @param name
	 * @param superID
	 * @param desc
	 * @param state
	 */
	public Audit(String log_id, String log_name, String log_level_name, String log_level, String orignal_id) {
		this.logId = log_id;
		this.logName = log_name;
		this.logLevel = log_level_name;
		this.logLevelName = log_level;
	}

	public String getLogId() {
		return logId;
	}

	public void setLogId(String logId) {
		this.logId = logId;
	}

	public String getLogName() {
		return logName;
	}

	public void setLogName(String logName) {
		this.logName = logName;
	}

	public String getLogLevel() {
		return logLevel;
	}

	public void setLogLevel(String logLevel) {
		this.logLevel = logLevel;
	}

	public String getLogLevelName() {

		if (this.logLevel.equals("0")) {
			this.logLevelName = "正常";
		}
		if (this.logLevel.equals("1")) {
			this.logLevelName = "一般";
		}
		if (this.logLevel.equals("2")) {
			this.logLevelName = "关注";
		}
		if (this.logLevel.equals("3")) {
			this.logLevelName = "重要";
		}
		if (this.logLevel.equals("4")) {
			this.logLevelName = "严重";
		}
		return logLevelName;
	}

	public void setLogLevelName(String logLevelName) {
		this.logLevelName = logLevelName;

	}
}
